<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>无标题文档</title>
    <link href="../../css/style.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="../../js/jquery.js"></script>
    <script type="text/javascript" src="../../js/statis/purchase/areaData.js"></script>
    <script type="text/javascript">
        function tipOpen(content) {
            $(".tipright p").text(content);
            $("#tip").fadeIn(200);
        }

        function tipClose() {
            $("#tip").fadeOut(200);
        }
    </script>
</head>

<body>
<div class="place"><span>位置：</span>
    <ul class="placeul">
        <li>采购管理</li>
        <li>厂商管理</li>
        <li>基本内容</li>
    </ul>
</div>
<div class="rightinfo">
    <form action="/manufacturerManage/vagueManufacturerSelect" method="post">
        <ul class="tools">
            <li> 公司名称:
                <input name="firmName" type="text"/>
            </li>
            <li> 负责人姓名:
                <input name="firmFounder" type="text"/>
            </li>
            <li> 所属区域：
                <select id="sheng" name='sheng'>
                    <option value="0">省</option>
                </select>
                <select id='shi' name="shi">
                    <option value="0">市</option>
                </select>
            </li>
            <li> 状态：
                <select name="status">
                    <option value="2">请选择</option>
                    <option value="1">可用</option>
                    <option value="0">不可用</option>
                </select>
            </li>
            <input type="submit" value="查询" class="subBut">

            <li class="subBut" onclick="window.location.href='../../purchase/manufacturer/manufacturerAdd.html'"><img src="../../images/t01.png"/>添加
            </li>
        </ul>
        <table class="tablelist">
            <thead>
            <tr>
                <th>序号</th>
                <th>厂商名称</th>
                <th>负责人</th>
                <th>联系电话</th>
                <th>所属区域</th>
                <th>状态</th>
                <th>创建时间</th>
                <th>创建人</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>

            <tr th:each="p:${manuManagementPage.data}">
                <td>[[${pStat.index + 1}]]</td>
                <td>[[${p.firmName}]]</td>
                <td>[[${p.firmFounder}]]</td>
                <td>[[${p.firmTel}]]</td>
                <td>[[${p.firmAddress}]]</td>
                <td><span th:if="${p.status} eq 0">不可用</span><span th:if="${p.status} eq 1">可用</span></td>
                <td>[[${#dates.format(p.createTime, 'yyyy-MM-dd HH:mm')}]]</td>
                <td>管理员</td>
                <td>
                    <a th:href="@{/manufacturerManage/getOneManuManagement/{id}
                    (id=${p.firmId})} " class="tablelink">查看详情</a>

                    <a th:if="${p.status} eq 0"><a th:href="@{/manufacturerManage/getUpdateManuManagement/{id}
                    (id=${p.firmId})} " class="tablelink">修改</a></a>

                    <a th:if="${p.status} eq 1"><a class="tablelink" onclick="tipOpen('是否确认注销此条信息？')"  th:href="@{/manufacturerManage/deleteManuManagement/{id}
                    (id=${p.firmId})} ">注销</a></a>


                </td>
            </tr>

            </tbody>
        </table>
        <div class="pagin">
            <div class="message">共<i class="blue">[[${manuManagementPage.totalRows}]]</i>条记录，当前显示第&nbsp;<i class="blue">[[${manuManagementPage.pageNum}]]&nbsp;</i>页
            </div>

            <ul class="paginList">

             <span th:if="${manuManagementPage.totalPage < 3}">
                <li class="paginItem" th:if="${manuManagementPage.pageNum>1}"><a
                 th:href="@{${'facturerList'}(pageNum=${manuManagementPage.pageNum-1})}"><span class="pagepre"></span></a>
                </li>
                <li class="paginItem"><a th:href="@{${'facturerList'}(pageNum=${1})}">1</a></li>
                <li class="paginItem current"><a th:href="@{${'facturerList'}(pageNum=${2})}">2</a></li>
            </span>

                <span th:if="${manuManagementPage.totalPage >= 3}">

               <li class="paginItem" th:if="${manuManagementPage.pageNum>1}"><a
                         th:href="@{${'facturerList'}(pageNum=${manuManagementPage.pageNum-1})}"><span class="pagepre"></span></a>
                </li>
                <li class="paginItem"><a th:href="@{${'facturerList'}(pageNum=${1})}">1</a></li>
                <li class="paginItem current"><a th:href="@{${'facturerList'}(pageNum=${2})}">2</a></li>
                <li class="paginItem more"><a href="javascript:;">...</a></li>
                <li class="paginItem"><a th:href="@{${'facturerList'}(pageNum=${manuManagementPage.totalPage})}">[[${manuManagementPage.totalPage}]]</a>
                </li>
                <li class="paginItem" th:if="${manuManagementPage.pageNum<=manuManagementPage.totalPage-1}"><a
                        th:href="@{${'facturerList'}(pageNum=${manuManagementPage.pageNum+1})}"><span class="pagenxt"></span></a>
                </li>

                </span>

            </ul>
        </div>
    </form>
    <!-- 提示框 -->
    <div id="tip" class="tip">
        <div class="tiptop"><span>提示信息</span><a onclick="tipClose()"></a></div>
        <div class="tipinfo"><span><img src="../../images/ticon.png"/></span>
            <div class="tipright">
                <p></p>
                <cite>如果是请点击确定按钮 ，否则请点取消。</cite></div>
        </div>
        <div class="tipbtn">
            <input name="" type="button" class="sure" value="确定" onclick="tipClose()" />
            &nbsp;
            <input name="" type="button" class="cancel" value="取消" onclick="tipClose()"/>
        </div>
    </div>
</div>
<script type="text/javascript">
    $('.tablelist tbody tr:odd').addClass('odd');
</script>
</body>
</html>
